/**
 * Created by chenxy on 2017/5/30.
 */

function weixinPay(URL,data){
    $.ajax({
        type:"POST",
        url:URL,
        data:data,
        cache:false,
        dataType:"JSON",
        success:function(json){
            WeixinJSBridge.invoke('getBrandWCPayRequest',json,function(res){
                if(res.err_msg == 'get_brand_wcpay_request:ok'){
                   //支付成功的回调函数
                    successFun();
                }else{
                    //支付失败
                    window.location.href="/views/his/public/app-pay-failed.html";
                }
            });
        }
    });
}
function successFun(){

}
